<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>定义栅格元素的放置规则</title>
		<style type="text/css">
		
		.grid-container{
			display: grid;
			grid-template-columns: 100px 100px 100px;
			grid-template-rows: 100px 100px 100px;
			grid-auto-flow: row dense;
		}
		
		.grid-container > div{
			font-size: 2em;
			text-align: center;
			height: 100px;
			line-height: 100px;
			border: white 1px solid;
		}
		
		.item1{
			background-color: #00FFFF;
			grid-column: 1/3;
		}
		
		.item2{
			background-color: #90EE90;
		}
		
		.item3{
			background-color: #FFF8DC;
		}
		
		.item4{
			background-color: lavender;
			grid-column: 1/3;
		}
		
		.item5{
			background-color: lavenderblush;
		}
		
		.item6{
			background-color: lightcoral;
		}
		
		.item7{
			background-color: lightgreen;
		}
		
		.item8{
			background-color: lightskyblue;
		}
		
		.item9{
			background-color: #E6E6FA;
		}
		</style>
	</head>
	<body>
		<div class="grid-container">
			<div class="item1">1</div>
			<div class="item2">2</div>
			<div class="item3">3</div>
			<div class="item4">4</div>
			<div class="item5">5</div>
			<div class="item6">6</div>
			<div class="item7">7</div>
			<div class="item8">8</div>
			<div class="item9">9</div>
		</div>
	</body>
</html>
